<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
         *{
            margin: 0;
            padding: 0;
        }
        .wrap{
            position: relative;
            width: 400px;
            height: 400px;
            padding: 100px;
            margin: 0 auto;
            background-color: #acf;
        }
        .inner{
            position: absolute;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            width: 200px;
            height: 200px;
            margin: auto;
            background-color: #ccc;
        }
    </style>

       


</head>
<body>
    <div class="wrap">
        <div class="inner"></div>
    </div>
</body>
</html>